"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _antd = require("antd");

var _dayjs = _interopRequireDefault(require("dayjs"));

var _react = _interopRequireDefault(require("react"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

var _default = [{
  type: 'INPUT',
  label: '节点名称',
  name: 'name',
  inputProps: {
    allowClear: true,
    placeholder: '请输节点名称',
    className: 'search-input'
  }
}, {
  label: '使用时长',
  value: '',
  props: 'time',
  type: 'SELECT',
  inputProps: {
    options: [{
      label: '1周',
      value: '1week'
    }, {
      label: '1月',
      value: '1month'
    }, {
      label: '1年',
      value: '1year'
    }],
    style: {
      width: '100%'
    }
  },
  rules: [{
    required: true,
    message: '请选择使用时长'
  }]
}, {
  type: '负责人',
  label: '',
  name: 'ownerId',
  inputProps: {
    allowClear: true,
    remote: function () {
      var _remote = _asyncToGenerator(function* (val) {
        if (!val) return [];
        return [{
          label: val,
          value: val
        }, {
          label: "".concat(val, "1"),
          value: "".concat(val, "1")
        }, {
          label: "".concat(val, "2"),
          value: "".concat(val, "2")
        }, {
          label: "".concat(val, "3"),
          value: "".concat(val, "3")
        }];
      });

      function remote(_x) {
        return _remote.apply(this, arguments);
      }

      return remote;
    }(),
    className: 'search-ownerId',
    placeholder: '请输入负责人ID'
  }
}, {
  type: 'DATERANGER',
  label: '使用时间',
  name: 'createTm',
  inputProps: {
    allowClear: true,
    disabledDate: current => {
      return current && current > (0, _dayjs.default)().endOf('day');
    },
    renderExtraFooter: () => {
      return /*#__PURE__*/_react.default.createElement("div", {
        style: {
          padding: 10
        }
      }, /*#__PURE__*/_react.default.createElement(_antd.Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u5468"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u6708"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u5E74"));
    }
  }
}];
exports.default = _default;